<script type="text/javascript">
    $(document).ready(function(){
        window.onresize = function() {
            window.location.href = window.location.href;
        };
    });
</script>
<div class="breadcrum">
    <p>
        <a href="{$config->site_url('master/overview')}">Master</a><span></span><small>Overview</small>
    </p>
    <div class="clear"></div>
</div>
<div class="dashboard-box left">
    <div id="chartdivi" style="text-align: center;">
                <script type="text/javascript">
                    var chart = new FusionCharts("{$BASEURL}resource/doc/charts/Column3D.swf", "ChartId1",(Math.round($("#chartdivi").width())*0.9),(Math.round($("#chartdivi").width())/4));
                    chart.setDataURL("{$config->site_url('master/overview/data_xml_master')}");
                    chart.render("chartdivi");
                </script> 
            </div>
    <div class="clear"></div>
</div>
<div class="clear"></div>
<div class="report-map">
    <div class="report-box2">
        <a href="{$config->site_url('master/bagian')}">
            <em>Bagian</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_bagian|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div>
    <div class="report-box2">
        <a href="{$config->site_url('master/lokasi')}">
            <em>Lokasi</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_lokasi|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div>
    <div class="report-box2">
        <a href="{$config->site_url('master/kategoribarang')}">
            <em>Kategori Barang</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_kategoribarang|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div>
    <div class="report-box2">
        <a href="{$config->site_url('master/vendor')}">
            <em>Vendor</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_vendor|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div>
    <div class="report-box2">
        <a href="{$config->site_url('master/milik')}">
            <em>Pemilik Ruang</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_milik|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div> 
    <div class="report-box2">
        <a href="{$config->site_url('master/personil')}">
            <em>Personil</em>
            <small><b>{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</b></small> 
            <span class="clear"></span>
            <small class="lefted">Total Data : </small><small class="righted"><b>{$ttl_personil|number_format:0:',':'.'|default:'0'}</b></small>
            <span class="clear"></span>
        </a>
    </div>
</div>
<div class="clear"></div>
<div class="report-map">
    <div class="report-table">
        <h4>Data Jenis Barang</h4>
        <div style="height: 228px;" class="report-table-content">
            <h5 align="center">{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</h5>
            <table width="100%">
                <tbody>
                    <tr>
                        <th width="10%">No</th>
                        <th width="60%">Kategori Barang</th>
                        <th width="30%">Total Data</th>
                    </tr>
                    {$nmr = 1}
                    {$total = 0}
                    {foreach from=$jenis item=kat}
                    <tr>  
                        <td align="center">{$nmr++}</td>
                        <td align="left">{$kat.nama_kat|default:''}</td>
                        <td align="center">{$kat.total|number_format:0:',':'.'|default:'0'}</td>
                        {$total = $total + $kat.total}
                    </tr>
                    {/foreach}
                    <tr>  
                        <td align="center"></td>
                        <td align="right"><b>JUMLAH</b></td>
                        <td align="center"><b>{$total|number_format:0:',':'.'|default:'0'}</b></td>
                    </tr>
                </tbody></table>
        </div>
        <div class="report-table-button">
            <a href="{$config->site_url('master/jenisbarang')}">Detail Data</a>
            <div class="clear"></div>
        </div>
    </div>
    <div class="report-table">
        <h4>Data Merk Barang</h4>
        <div style="height: 228px;" class="report-table-content">
            <h5 align="center">{$rs_today.hari|default:''}, {$rs_today.tanggal|default:''} {$rs_today.bulan|default:''} {$rs_today.tahun|default:''}</h5>
            <table width="100%">
                <tbody>
                    <tr>
                        <th width="10%">No</th>
                        <th width="60%">Kategori Barang</th>
                        <th width="30%">Total Data</th>
                    </tr>
                    {$nom = 1}
                    {$totals = 0}
                    {foreach from=$merk item=kats}
                    <tr>  
                        <td align="center">{$nom++}</td>
                        <td align="left">{$kats.nama_kat|default:''}</td>
                        <td align="center">{$kats.total|number_format:0:',':'.'|default:'0'}</td>
                        {$totals = $totals + $kats.total}
                    </tr>
                    {/foreach}
                    <tr>  
                        <td align="center"></td>
                        <td align="right"><b>JUMLAH</b></td>
                        <td align="center"><b>{$totals|number_format:0:',':'.'|default:'0'}</b></td>
                    </tr>
                </tbody></table>
        </div>
        <div class="report-table-button">
            <a href="{$config->site_url('master/merk')}">Detail Data</a>
            <div class="clear"></div>
        </div>
    </div> 
    <div class="report-table">
        <h4>Data Ruang</h4>
        <div style="height: 228px;" class="report-table-content">
            <div id="chartdiv" style="text-align: center;">
                <script type="text/javascript">
                    var chart = new FusionCharts("{$BASEURL}resource/doc/charts/Column2D.swf", "ChartId",(Math.round($("#chartdiv").width())),(Math.round($("#chartdiv").width())/1.6));
                    chart.setDataURL("{$config->site_url('master/overview/data_xml_ruang')}");
                    chart.render("chartdiv");
                </script> 
            </div>
            <table width="100%">
                <tbody>
                    {$ttl = 0}
                    {foreach from=$ruang item=res}
                    {$ttl = $ttl + $res.total}
                    {/foreach}
                    <tr>  
                        <td align="right" width="70%"><b>JUMLAH</b></td>
                        <td align="center" width="30%"><b>{$ttl|number_format:0:',':'.'|default:'0'}</b></td>
                    </tr>
                </tbody></table>
        </div>
        <div class="report-table-button">
            <a href="{$config->site_url('master/ruang')}">Detail Data</a>
            <div class="clear"></div>
        </div>
    </div>
    <div class="clear"></div>
</div> 
